<template>
    <div>
        案例 帅哥美女走一走
    </div>
    <li v-for="item in strarr" :key="item">
        {{ item }}
    </li>
    <button @click="btn">走一走</button>
</template>

<script setup>
import { ref } from 'vue';

const strarr = ref(["帅哥", "美女", "程序员"])

const btn = () => { 
    //头部数据加入到尾部
    strarr.value.push(strarr.value[0])
    //在把头部的数据给删除
    strarr.value.shift()
}


</script>

<style scoped>

</style>